export const getCustomIndicators = (PineJS) => {
  return Promise.resolve([
    {
      name: "KDJ",
      metainfo: {
        _metainfoVersion: 40,
        isTVScript: !1,
        isTVScriptStub: !1,
        is_hidden_study: !1,
        defaults: {
          styles: {
            plot_0: {
              linestyle: 0,
              linewidth: 1,
              plottype: 0,
              trackPrice: !1,
              transparency: 0,
              visible: !0,
              color: "#2196F3",
            },
            plot_1: {
              linestyle: 0,
              linewidth: 1,
              plottype: 0,
              trackPrice: !1,
              transparency: 0,
              visible: !0,
              color: "#FF6D00",
            },
            plot_2: {
              linestyle: 0,
              linewidth: 1,
              plottype: 0,
              trackPrice: !1,
              transparency: 0,
              visible: !0,
              color: "#fffbe6",
            },
          },
          bands: [
            {
              color: "#787B86",
              linestyle: 2,
              linewidth: 1,
              visible: !0,
              value: 80,
            },
            {
              color: "#787B86",
              linestyle: 2,
              linewidth: 1,
              visible: !0,
              value: 20,
            },
          ],
          filledAreasStyle: {
            fill_0: { color: "#2196F3", transparency: 90, visible: !0 },
          },
          inputs: { in_0: 9, in_1: 3, in_2: 3 },
        },
        plots: [
          { id: "plot_0", type: "line" },
          { id: "plot_1", type: "line" },
          { id: "plot_2", type: "line" },
        ],
        styles: {
          plot_0: { title: "%K", histogramBase: 0, joinPoints: !1 },
          plot_1: { title: "%D", histogramBase: 0, joinPoints: !1 },
          plot_2: { title: "%J", histogramBase: 0, joinPoints: !1 },
        },
        description: "KDJ",
        shortDescription: "KDJ",
        is_price_study: !1,
        bands: [
          { id: "hline_0", name: "UpperLimit" },
          { id: "hline_1", name: "LowerLimit" },
        ],
        filledAreas: [
          {
            id: "fill_0",
            objAId: "hline_0",
            objBId: "hline_1",
            type: "hline_hline",
            title: "Hlines Background",
          },
        ],
        inputs: [
          {
            id: "in_0",
            name: "K",
            defval: 14,
            type: "integer",
            min: 1,
            max: 1e4,
          },
          {
            id: "in_1",
            name: "D",
            defval: 1,
            type: "integer",
            min: 1,
            max: 1e4,
          },
          {
            id: "in_2",
            name: "smooth",
            defval: 3,
            type: "integer",
            min: 1,
            max: 1e4,
          },
        ],
        id: "KDJ@tv-basicstudies-1",
        scriptIdPart: "",
        name: "KDJ",
        format: { precision: 2, type: "price" },
      },
      constructor: function() {
        this.main = function(e, t) {
          const s = PineJS;
          (this._context = e), (this._input = t);
          var i = this._input(0),
            r = this._input(1),
            n = this._input(2);
          this._context.setMinimumAdditionalDepth(i + r + n);
          var o = s.Std.close(this._context),
            a = s.Std.high(this._context),
            l = s.Std.low(this._context),
            c = this._context.new_var(o),
            h = this._context.new_var(a),
            u = this._context.new_var(l),
            d = s.Std.stoch(c, h, u, i, this._context),
            p = this._context.new_var(d),
            pK = s.Std.sma(p, r, this._context),
            m = this._context.new_var(pK),
            pD = s.Std.sma(m, n, this._context);
          var pJ = 3 * pK - 2 * pD;
          return [pK, pD, pJ];
        };
      },
    },
  ]);
};
